const path = require("path")
function resolve(ur){
    return path.resolve(__dirname,ur)
}
module.exports={
    chainWebpack:(config)=>{
        config.resolve.alias
        .set('@',resolve("./src"))
        .set('components',resolve("./src/components"))
        .set('assets',resolve("./src/assets"))
        .set('views',resolve("./src/views"))
        .set('store',resolve("./src/store"))
        .set('pages',resolve("./src/pages"))
        .set('util',resolve("./src/util"))
    },
    devServer:{
        proxy:{
            '/ajax':{
                target:'https://www.missevan.com',
                changeOrigin:true,
                pathRewrite:{
                    '^/ajax':''
                },
                secure: false,
                ws: true
            },
            '/fm':{
                target:'https://fm.missevan.com',
                changeOrigin:true,
                pathRewrite:{
                    '^/fm':''
                }
            }
        },
        disableHostCheck: true
    }
}